package com.honglv.controller.common;

import com.honglv.pojo.dto.SendCodeDTO;
import com.honglv.pojo.result.Result;
import com.honglv.service.SendCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: 生
 * @Date: 2024/04/01/17:26
 * @Description:
 */
@RestController
@RequestMapping(value = "/sendIdentifyCode")
public class SendCodeConteoller {
    @Autowired
    private SendCodeService sendCodeService;

    @RequestMapping(value = "/sentCode" , method = RequestMethod.POST)
    public Result sms(@RequestBody SendCodeDTO sendCodeDTO){
        return sendCodeService.sendCode(sendCodeDTO.getPhone(),sendCodeDTO.getStatus());
    }
}
